﻿///<reference path="../../scripts/jquery-1.4.4.min.js" />
///<reference path="../../scripts/kooboo/kooboo.form.js" />


$(function () {
    $("form").submit(function () {
        var row = $(this).parents("tr:first");
        $(this).ajaxPost({
            success: function () {
                row.remove();
            }
        });

        return false;
    });


    $(".delete-link").click(function (e) {
        e.preventDefault();
        if (confirm($(this).attr("message"))) {
            $(this).parents("form:first").submit();
        }

        return false;
    });
});